@import 'common/utils';
@import 'common/spin';
/**
  * Spinning dots
  *
  * @author jh3y
*/
$radius: 25px;
$size: 10px;
$no-of-dots: 7;
$color: var(--primary);

@function genShadow() {
  $shadows: ();
  @for $dot from 1 through $no-of-dots {
    $angle: (360 / $no-of-dots) * ($dot - 1);
    $xy: getPosition($angle, $radius);
    $shad-props: $xy 0 0 $color;
    $shadows: append($shadows, $shad-props, comma);
  }
  @return $shadows;
}

.spinning-dots:before {
  animation: spin 1.5s infinite linear;
  border-radius: $size;
  box-shadow: genShadow();
  content: '';
  height: $size;
  width: $size;
}
